<?php

namespace app\utils;

use PhpOffice\PhpSpreadsheet\IOFactory;
use think\facade\Filesystem;
use think\File;

class ExcelUtils
{
    public function excel2arr($saveClass, File $uploadFile){
        $saveName = Filesystem::disk('local')->putFile($saveClass, $uploadFile);
        $filePath = Filesystem::disk('local')->path($saveName);
        $spreadsheet = IOFactory::load($filePath);
        return $spreadsheet->getActiveSheet()->toArray();
    }

    public function arr2excel(){

    }





}